cmake_minimum_required(VERSION 3.15.1)

project(tig LANGUAGES CXX VERSION 2.5.8)

add_custom_target(tig ALL 
    BYPRODUCTS ${CMAKE_SOURCE_DIR}/src/tig
    COMMAND make 
    COMMENT "Start"
    VERBATIM 
    USES_TERMINAL 
    WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})

install(PROGRAMS src/tig DESTINATION bin)
install(FILES ./tigrc DESTINATION /etc)

##
# [deb] For Linux(with dpkg)
# 注释行(使用方式)
find_package(SparkDebPackage PATHS ${CMAKE_SOURCE_DIR})
add_package_descript(cmake/spark-deb-package.descript)